package com.newlink.building.common_base.utils

import android.util.Log
import java.util.*

/**
 * Created by xiaodong on 2024/5/24.
 */
object RandomUtils {
    fun generateRandomPort(): Int {
        var randomPort: Int
        do {
            randomPort = Random().nextInt(65536 - 1024) + 1024 //随机端口号 1024~65535
        } while (randomPort == 5060)//如果端口号是5060，则重新生成
        Log.d("[RandomUtils]", "randomPort:$randomPort")
        return randomPort
    }
}